/*   time:2020-03-06 00:05:25*/
requirePlugin("live-player-plugin");
var t = getApp().requirejs("core");
Page({
    data: {
        show: !1,
        loaded: !1,
        page: 1,
        list: [],
        total: 0,
        empty: !1
    },
    onLoad: function(options) {
        var i = this;
    console.log('options', options) // 房间号
    // console.log('get room id', options.room_id) // 房间号
    // console.log('get room mid', options.mid) // 房间号
                        // console.log('get openid', options.openid) // 用户openid

        // var s = decodeURIComponent(e.scene);
        // if (!options.id && s) {
        //     var z = a.str2Obj(s);
        //     console.log('scene',i);
        //     options.id = z.id, z.mid && (options.mid = z.mid);
        // }




        // var s = options.id;



        // this.getList(!1)
    },
    onReachBottom: function() {
        // this.data.loaded || this.data.list.length == this.data.total || this.getList(!1)
    },
    onPullDownRefresh: function() {
        this.getList(!0)
    },
    getList: function(a) {
        var e = this;
        a && (e.data.page = 1, e.data.list = []), t.get("live/room/get_list", {
            page: e.data.page
        }, function(t) {
            var i = {
                total: t.total,
                pagesize: t.pagesize,
                show: !0
            };
            t.list.length > 0 ? (i.page = e.data.page + 1, i.list = e.data.list.concat(t.list), t.list.length < t.pagesize ? i.loaded = !0 : i.loaded = !1, i.empty = !1) : (i.empty = !0, i.list = []), e.setData(i), wx.setNavigationBarTitle({
                title: t.sysset.shopname || "商城直播"
            }), a && wx.stopPullDownRefresh()
        }, this.data.show)
    }
});